<%@
page contentType="text/html;charset=UTF-8"
language="java"
isELIgnored="false"
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--web.xml的版本是2.3 ，不支持el表达式。isELIgnored要设为false--%>
<html>
<head>
<title>majorInfo</title>
<script>
function checkAll(obj)
{
var boxes=document.getElementsByName("id");
for(var i=0;i<boxes.length;i++){boxes[i].checked=obj.checked;}
}
</script>

</head>
<body>
<a href="${pageContext.request.contextPath}/findAllClasses" >班级信息</a>
<br/><br/>
<a href="${pageContext.request.contextPath}/addMajor" >添加专业信息</a>
<table border="1">
<tr>
    <td><input type="checkbox" onclick="checkAll(this)" id="all" value="全选" /></td>
    <td>专业ID</td>
    <td>专业名称</td>
    <td>学费</td>
    <td>修改</td>
    <td>删除</td>
</tr>

<form action="deleteMajors" method="post" >
<input type="submit" value="批量删除" />

<c:forEach items="${majorList}" var="major">
<tr>
    <td><input type="checkbox" name="id" value="${major.majorId}"/></td>
    <td>${major.majorId}</td>
    <td>${major.majorName}</td>
    <td>${major.tuition}</td>
    <td><a href="findMajorByMajorId?majorId=${major.majorId}">修改</a></td>>
    <td><a href="deleteMajorByMajorId?majorId=${major.majorId}">删除</a></td>>
</tr>
</c:forEach>

</form>

</table>
</body>
</html>
